<include file="../Public/header" />
<link href="{:APPS_URL}/w3g/_static/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
  body{background-color: #f8f8f8;}
</style>
<script language="javascript" type="text/javascript">
// 收起  放开
var slideToggle = function(id){
    $('#'+id).slideToggle('slow');
}
</script>

<div id="content">
    <div id="weiba" data-title="群组" class="panel" data-selected="true"  data-menu="msgmenu" style="padding:0;">
        <header>
            <div id="header-buttons">
                <a href="javascript:history.go(-1);">
                    <div id="back" class="header-menu-link" data-back="false">
                    </div>
                </a>

                <div id="messageLink" class="header-menu-link"><a href="{:U('w3g/Index/msgbox')}"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
                <div id="otherLink">
                    <a id="addLink" class="header-menu-link" href="{:U('w3g/Group/add')}"></a>
                    <a id="searchLink" class="header-menu-link" href="#"></a>
                </div>
            </div>
            <h1 class="hasback">
                群组
            </h1>
        </header>
<div class="mainWeiba">

    <div class="grouplist">

        <div class="section" id="selectBox">
              <div class="slt2"><a  href="javascript:void(0);" onclick="slideToggle('#selectBox','#gc_hide','#selectList');"><span class="title">{$cate_title}</span><img height="10" class="icons ml10" src="{:APPS_URL}/w3g/_static/images/arrow_b.png"></a></div>

              <!-- 微吧分类列表 -->
              <div class="Gcate" id="gc_hide" style="display:none;">
                <ul class="clearfix">
                  <li><a href="{:U('w3g/Group/lists', array('cate'=>'-2'))}">热门</a></li>
                  <volist name="catelist" id="vo">
                  <li><a href="{:U('w3g/Group/lists', array('cate'=>$vo[id]))}">{$vo.title}</a></li>
                  </volist>
                </ul>
              </div>

              <div class="slc clearfix">
                <div class="Glist" id="selectList">
                  <!-- 每页显示10个微吧 -->
                    <volist name="list.data" id="vo">
                      <dl onclick="javascript:window.open('{:U('w3g/Group/detail',array('gid'=>$vo['id']))}','_self')">
                        <dt><a href="{:U('w3g/Group/detail',array('gid'=>$vo['id']))}"><img width="140" height="70" src="{$vo['logo']|logo_path_to_url}"></a></dt>
                        <dd>
                          <h3><a href="{:U('w3g/Group/detail',array('gid'=>$vo['id']))}" title="{$vo.name}">{$vo.name|getShort=12,'...'}</a> </h3>
                          <h4><img height="14" class="icons mr3" src="{:APPS_URL}/w3g/_static/images/ico_cy.png" alt="成员">{$vo.membercount}</h4>
                          <p>{$vo.intro}</p>
                        </dd>
                      </dl>
                    </volist>
                </div>

                <div class="mini-page">{$list.waphtml}</div>
              </div>

        </div>    

    </div>

</div>
</div>
<script type="text/javascript">
//var hide = true;
function slideToggle(tit, sel, ls){
  var titBox = $(tit).find('.title');
  var selBox = $(tit).find(sel);
  var listBox = $(ls);
  //if(hide){
    selBox.toggle();
  //   hide = false;
  // }else{
  //   selBox.hide();
  //   hide = true;
  // }
  if (event.stopPropagation) { 
    // this code is for Mozilla and Opera 
    event.stopPropagation(); 
  } 
  else if (window.event) { 
    // this code is for IE 
     window.event.cancelBubble = true; 
  }
}
$(function(){
    //hide = true;
   //  var arrow_t = "{:APPS_URL}/w3g/_static/images/arrow_t.png";
   //  var arrow_t0 = "{:APPS_URL}/w3g/_static/images/arrow_t0.png";
    
   // $('.slt').click(function(){
   //     var cla = $(this).find('span').attr('title');
   //     if(cla=='收起'){
   //         $(this).find('span').attr('title', '展开');
   //         $(this).find('img').attr('src', arrow_t0);
   //         $(this).next().hide();
   //     }else{
   //         $(this).find('span').attr('title', '收起');
   //         $(this).find('img').attr('src', arrow_t);
   //         $(this).next().show();          
   //     }
   // });

});
</script>
<include file="../Public/footer" />